Method and apparatus of image processing

ABSTRACT

An edge detection filter comprising an array of filter coefficients having an odd number of rows and columns, a first set of zero coefficients extending along a direction traversing the array through a center position to form a first and second side, a second set of positive coefficients extending away from the direction on the first side, and a third set of negative coefficients extending away from the direction on the second side.

BACKGROUND OF THE INVENTION

1. Field of Invention

The present invention relates to a method and apparatus of imageprocessing to detect and enhance edges and to reduce noise in medicalimaging, e.g. ultrasound imaging, X-ray, MRI, CT. Specifically, themethod and apparatus of the present invention relates to the detectionof edges in noisy images and enhancement of such edges.

2. Description of Related Art

An object, such as an organ, in an image has borders or edges and imageprocessing can detect these borders or edges. Detection of edges isusually performed with filters 11 as shown in FIGS. 1 a-1 c. However, itis difficult to detect edges in an image with noise (or poor signal tonoise ratio). Edges of noise patterns can be erroneously detected as“edges” rather than the true edges of an object or organ for example.Therefore, a low-pass filter is usually applied to the image before theedge detection in order to reduce noise and to detect the true edgesreliably. A low-pass filter can be 3×3, 5×5 or 7×7 or more in size. Suchfilters are known in the art and examples are illustrated in FIGS. 2 a-2c. After the low-pass filter is applied, edge detection is performedusing, for example, the filter shown in FIG. 1 a. The low-pass filtersmoothes the image and reduces noise. However, low-pass filter masksoverride each other when the filter in FIG. 1 a is used, resulting insomewhat fuzzy edges as well as spatial errors with respect to the trueedges of the original image. What is therefore needed is a method todetect true edges in images containing noise which does not result inthe production of fuzzy edges or spatial errors.

SUMMARY OF THE INVENTION

Accordingly, it is an object of the present invention to provide amethod and apparatus of image processing to detect and enhance edges andto reduce noise in medical imaging, e.g. ultrasound imaging, X-ray, MRI,CT. Specifically, the method and apparatus of the present inventionrelates to the detection of edges in noisy images and enhancement ofsuch edges.

In accordance with the present invention, an edge detection filtercomprises an array of filter coefficients having an odd number of rowsand columns, a first set of zero coefficients extending along adirection traversing the array through a center position to form a firstand second side, a second set of positive coefficients extending awayfrom the direction on the first side, and a third set of negativecoefficients extending away from the direction on the second side.

In accordance with the present invention, a method for detecting edgesin an image comprises the steps of applying a horizontal edge detectionfilter to the image to produce a horizontal edge detection result,applying a vertical edge detection filter to the image to produce avertical edge detection result, and combining the horizontal edgedetection result and the vertical edge detection result to detect anedge.

In accordance with the present invention, a method for applying an edgedetection filter to an image comprises the steps of a. providing animage comprised of rows and columns, b. providing an edge detectionfilter comprising an array of filter coefficients having an odd numberof rows and columns, a first set of zero coefficients extending along adirection traversing the array through a center position to form a firstand second side, a second set of coefficients equal to 1 extending awayfrom the direction on the first side, and a third set of coefficientsequal to −1 extending away from the direction on the second side, c.positioning the edge detection filter to a position at a first directionorigin and a second direction origin of the image, d. applying the edgedetection filter to the image to calculate a plurality of row values, e.storing each of the plurality of row values in a memory location, f.summing each of the plurality of memory locations to produce a filteroutput, g. shifting the contents of the plurality of memory locations,h. incrementing the position of the edge detection filter in a firstdirection; i. repeating steps d through h until an edge of the image isreached, j. incrementing the position of the edge detection filter in asecond direction and resetting the position to the first directionorigin of the image, and h. repeating steps d through j until an edge ofthe image is reached.

In accordance with the present invention, an edge detection filtercomprises an array of filter coefficients having an odd number of rowsand columns, a first set of zero coefficients extending along adirection traversing the array through a center position to form a firstand second side, a second set of positive coefficients extending awayfrom the direction on the first side wherein each of the second set ofpositive coefficients is the product of two predefined coefficients, anda third set of negative coefficients extending away from the directionon the second side wherein each of the third set of negativecoefficients is the product of two predefined coefficients.

In accordance with the present invention, an apparatus for performingedge detection comprises an image comprised of rows and columns, an edgedetection filter comprising an array of filter coefficients having anodd number of rows and columns, a first set of zero coefficientsextending along a direction traversing the array through a centerposition to form a first and second side, a second set of coefficientsequal to 1 extending away from the direction on the first side, and athird set of coefficients equal to −1 extending away from the directionon the second side, apparatus for applying the edge detection filter tothe image to calculate a plurality of row values, apparatus for storingeach of the plurality of row values in a memory location, apparatus forsumming each of the plurality of memory locations to produce a filteroutput, and apparatus for shifting the contents of the plurality ofmemory locations.

In accordance with the present invention, a method for applying an edgedetection filter to an image comprises the steps of a. providing animage comprised of rows and columns, b. providing an edge detectionfilter comprising an array of filter coefficients having an odd numberof rows and columns, a first set of zero coefficients extending along adirection traversing the array through a center position to form a firstand second side, a second set of coefficients equal to 1 extending awayfrom the direction on the first side, and a third set of coefficientsequal to −1 extending away from the direction on the second side, c.positioning the edge detection filter to a position at a first directionorigin and a second direction origin of the image, d. applying the edgedetection filter to the image to calculate a plurality of row values, e.storing each of the plurality of row values in one of a plurality ofmemory locations, f. summing each of the plurality of memory locationsto produce a filter output, g. incrementing the position of the edgedetection filter in a first direction, h. shifting the contents of theplurality of memory locations to add a new row and create an old row, i.summing a plurality of values comprising the new row to produce a newrow value, j. adding the new row value to the filter output andsubtracting the old row value from the filter output to produce a filteroutput, k. repeating steps g through j ji until an edge of the image isreached, l. incrementing the position of the edge detection filter in asecond direction and resetting the position to the first directionorigin of the image, and m. repeating steps d through l until an edge ofthe image is reached.

Accordingly, it is an object of the present invention to provide amethod for applying an edge detection filter to an image comprises thesteps of a. providing an image comprised of rows and columns, b.providing an edge detection filter comprising an array of filtercoefficients having an odd number of rows and columns, a first set ofzero coefficients extending along a direction traversing the arraythrough a center position to form a first and second side, a second setof coefficients equal to 1 extending away from the direction on thefirst side, and a third set of coefficients equal to −1 extending awayfrom the direction on the second side, c. positioning the edge detectionfilter to a position at a first direction origin and a second directionorigin of the image, d. applying the edge detection filter to the imageto calculate a plurality of row values, e. storing each of the pluralityof row values in one of a plurality of memory locations, f. summing eachof the plurality of memory locations to produce a filter output, g.incrementing the position of the edge detection filter in a firstdirection, h. shifting the contents of the plurality of memory locationsto add a new row and create an old row, i. summing a plurality of valuescomprising the new row to produce a new row value, j. adding a firstportion of the new row value to the filter output, subtracting a secondportion of the new row value to the filter output, subtracting a firstportion of the old row value from the filter output, and adding aportion of the old row value to produce a filter output, k. repeatingsteps g through j until an edge of the image is reached, l. incrementingthe position of the edge detection filter in a second direction andresetting the position to the first direction origin of the image, andm. repeating steps d through l until an edge of the image is reached.

In accordance with the present invention, a method for applying an edgedetection filter to an image comprises the steps of a. providing animage comprised of rows and columns, b. providing an edge detectionfilter comprising an array of filter coefficients having an odd numberof rows and columns, a first set of zero coefficients extending along adirection traversing the array through a center position to form a firstand second side, a second set of coefficients equal to 1 extending awayfrom the direction on the first side, and a third set of coefficientsequal to −1 extending away from the direction on the second side, c.positioning the edge detection filter to a position at a first directionorigin and a second direction origin of the image, d. applying the edgedetection filter to the image to calculate a plurality of column values,e. storing each of the plurality of column values in one of a pluralityof memory locations, f. summing each of the plurality of memorylocations to produce a filter output, g. incrementing the position ofthe edge detection filter in a first direction, h. shifting the contentsof the plurality of memory locations to add a new column and create anold column, i. summing a plurality of values comprising the new columnto produce a new column value, j. adding a first portion of the newcolumn value to the filter output, subtracting a second portion of thenew column value to the filter output, subtracting a first portion ofthe old column value from the filter output, and adding a portion of theold column value to produce a filter output, k. repeating steps gthrough j until an edge of the image is reached, l. incrementing theposition of the edge detection filter in a second direction andresetting the position to the first direction origin of the image, andm. repeating steps d through l until an edge of the image is reached.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1(a-c) Prior art edge detection filters

FIGS. 2(a-b) Prior art smoothing filters

FIG. 2 c Effect of 1×3 edge detection filter and smoothing filter of 5×5

FIG. 3 a A 1×3 edge detection filter common in the art

FIG. 3 b A 5×5 low pass filter known in the art

FIG. 3 c The result of combining the −1 edge filter coefficient with the5×5 low-pass filter

FIG. 3 d The result of combining the 1 edge filter coefficient with the5×5 low-pass filter

FIG. 3 e The resulting combination of the results of FIGS. 3 c and 3 d

FIG. 4 The improved edge detection filter of the present invention

FIGS. 5(a-h) Edge detection filters of various directions of the presentinvention

FIGS. 6(a-b) Edge detection filters of horizontal and verticaldirections showing the more general form wherein a coefficient “a” isemployed

FIGS. 7(a-b) Edge detection filters of horizontal and verticaldirections using more general form using aij

FIGS. 8(a-b) Edge detection filters of horizontal and verticaldirections using more general form using more general form using bibj

FIG. 9 a Flow chart of vertical edge detection using (−1, 0, 1)

FIG. 9 b Flow chart of horizontal edge detection using (−1, 0, 1)

FIG. 10 a Flow chart of horizontal edge detection using −a, 0, a

FIG. 10 b Flow chart of vertical edge detection using −a, 0, a

FIG. 11 Diagram of the relationship between old and new filter positions

FIG. 12 Illustration of the movement of the filter of the presentinvention

FIG. 13 Block diagram of the vertical edge filter hardware of thepresent invention

FIG. 14 Diagram of an efficient vertical edge detection filter

FIG. 15 Diagram of the horizontal edge filter hardware of the presentinvention

FIG. 16 Diagram of an efficient horizontal edge detection filter

FIG. 17 Diagram of the horizontal edge detection filter with filtercoefficients bi

FIG. 18 Diagram of the vertical edge detection filter with filtercoefficients bi

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT(S)

Edges of an object or organ have directions. Therefore, edge detectionneeds to be performed in directions. With reference to FIG. 5 a-5 h,there is illustrated edge detection filters in 8 directions (−45°, 45°,67.5°, 22.5°, −67.5°, −22.5°, 0°, 90°, respectively) of the presentinvention. Each filter is implemented so as to produce the effect oflow-pass filtering as the size of each filter is large and is capable ofdetecting edges reliably with a better signal to noise ratio than thatof the prior art. Yet, unlike the edge detection filter after low-passfiltering of the prior art, the present invention applies the operationof differentiation to image pixels which are not overriding each other.To illustrate this problem of the preprocessing of a low-pass filter, a1×3 edge detection filter 31 of the horizontal direction, which is apart (or column) of the filter 11 in FIG. 1 a, is shown in FIG. 3 a.Using three columns of the filter 11 yields an effect of averaging and ahigher signal to noise ratio of detecting edges. However, forsimplicity, the edge detection filter 31 in FIG. 3 a is used toillustrate the overriding problem. FIG. 3 b shows a 5×5 low-pass filter33 which is applied to an image before the edge detection filter 31.FIG. 3 c shows the combination of the edge filter's 31 coefficient −1and the low-pass filter 33 while FIG. 3 d shows the combination of theedge filter's 31 coefficient 1 and the low-pass filter 33. The filter's31 coefficient 0 has no effects or no output. FIG. 3 e shows the overalleffect of the edge filter 31 and the low-pass filter 33 on the originalimage. The center three rows are overridden and the filter coefficientscancel each other and become 0. The center three rows of zero act likean edge detection filter of a spatial resolution of approximately 3times worse than the original filter of a 1×3 filter having only one rowof zeros. Therefore, the detected edge will be fuzzy. To maintain thespatial resolution (sharpness) and registration (position) of the edge,the row of coefficients 0 should be as narrow as possible. Three rows ofzeros are two rows too many for coefficients of 0. An improved edgedetection filter is shown for the same size array (7×5) in FIG. 4. Thisimproved filter 15 is more accurate in detecting the position of theedge than is that of FIG. 3 e and yet has better signal-to-noise ratio(SNR) in detecting the edge as it has a feature of low-pass filtering inthe upper and lower areas surrounding the row of 0. Usually, an edgedetection filter is applied to an image with the result of the filteroperation assigned to a pixel representing the center of the edgedetection filter. Typically, when the edge detection filter is centeredon an edge, the value of the center pixel is of a large relativemagnitude.

Referring to FIGS. 5 a-5 h, eight edge detection filters of the presentinvention are shown to illustrate the main concept of the filter of thepresent invention. The number of filters or directions can be extendedto twenty or more with eight exemplary filters shown in FIG. 5. Twentyfilters can be designed with a step of approximately nine degrees indirection. As shown in FIG. 5, the filters 51 have coefficients at theintersection of each row and column of an integer value, usually 1, −1or 0, to provide for quick calculation. Coefficients of 1, −1 or 0 donot require multiplication but, rather, can be applied to an image usingonly addition and subtraction. However, filter coefficients are notnecessarily restricted to integers but can be extended to decimal values(or floating-point numbers). Filter coefficients of all these filters 51are symmetrical except the sign (i.e., plus or minus) either vertically,horizontally or in the direction of the edge that the filter is designedto detect. The center positions are all 0. For example, filtercoefficients of the center row are all 0 for a horizontal edge detectingfilter as illustrated in FIG. 5 g. Filter coefficients of the centercolumn are all 0 for a vertical edge detecting filter as shown in FIG. 5h. Note that, with the exception of directions of 0°, 90°, 45°, and−45°, the zero coefficients of the edge detection filter 31 are locatedin the row and column positions aligned with detection direction 57.

Edge detection filters with many directions are ideal for detectingedges with great accuracy and sensitivity for the directions butsomewhat limited for real-time implementation. Each filter requires manycalculations for a given image and the number of overall calculationsincrease with the number of filters. Therefore, an alternativeembodiment of the present invention uses only 2 filters of the verticaland horizontal directions. Edges of other directions are detected usinga filter size (2M+1)×(2N+1) as follows $\begin{matrix}{R_{X} = {{- {\overset{i = {{2M} + 1}}{\sum\limits_{\overset{i = 1}{j = 1}}^{j = N}}z_{i,j}}} + {\sum\limits_{\overset{i = 1}{j = {N + 2}}}^{\overset{i = {{2M} + 1}}{j = {{2N} + 1}}}z_{i,j}}}} & (1) \\{R_{Y} = {\sum\limits_{j = 1}^{j = {{2N} + 1}}\left( {{- {\sum\limits_{i = 1}^{i = M}z_{i,j}}} + {\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,j}}} \right)}} & (2)\end{matrix}$

M and N are integers and can be equal to each other. Z_(i,j) is theimage value to which the filter is applied at a point (i,j). R is thefilter output.The direction of the edge is determined by $\begin{matrix}{\vartheta = {\tan^{- 1}\frac{R_{Y}}{R_{X}}}} & (3)\end{matrix}$The magnitude or strength of the edge is determined bymag=(R _(X) ² +R _(y) ²)^(0.5) ≈|R _(X) |+|R _(Y)|  (4)

The magnitude of the combined horizontal (R_(x)) and vertical (R_(y))edge detection results is indicative of the presence of an edge.

The use of these 2 edge filters alone speed up the processing by afactor of 10 compared with the use of 20 filters. Furthermore, the useof these 2 edge detection filters makes it possible to further speed upthe processing by reducing the number of identical calculationsperformed at different filter positions. For a filter mask size of about11×11, this increase in speed can be as much as 10 times as described inthe following sections. Therefore, combined with the decrease in thenumber of filters, the overall increase in the speed can be as much as100 times. This makes real-time implementation of image processingpossible.

One method employed by the present invention to speed up thecalculations required to apply one or more edge filters of the presentinvention involves iteration. A general form of the edge filter can beexpressed by $\begin{matrix}{R = {\sum\limits_{\overset{i = 1}{j = 1}}^{\overset{i = {{2M} + 1}}{j = {{2N} + 1}}}{w_{ij}z_{ij}}}} & (5)\end{matrix}$where, i: x-coordinate, j; y-coordinate in the filter mask, and M, N areodd integers, R is the filter output and, w_(ij) are the filtercoefficients at (i,j) while z_(ij) are image values at (i,j).

For the horizontal edge filter (0 degrees or x-direction) shown in FIG.5 g, the filter can be expressed as follows, $\begin{matrix}{R_{X} = {{- {\overset{i = {{2M} + 1}}{\sum\limits_{\overset{{i = 1},}{j = 1}}^{j = N}}z_{i,j}}} + {\sum\limits_{\overset{i = 1}{j = {N + 2}}}^{\overset{i = {{2M} + 1}}{j = {{2N} + 1}}}z_{i,j}}}} & (6)\end{matrix}$

And this can be further expressed for each row as follows,$\begin{matrix}{R_{X,1} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,1}}} & (7) \\{R_{X,2} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,2}}} & (8) \\{R_{X,{{2N} + 1}} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,{{2N} + 1}}}} & (9)\end{matrix}$Then the result of each row calculation is summed as follows,$\begin{matrix}{R_{X} = {{- {\sum\limits_{j = 1}^{j = N}R_{X,j}}} + {\sum\limits_{j = {N + 2}}^{j = {{2N} + 1}}R_{X,j}}}} & (10)\end{matrix}$where the center row (j=N+1) coefficient is 0.

In order to speed up the filter calculation for the whole image area 10of many filter positions 13, 13′ as illustrated in FIG. 12. Once thefilter 15 at the first position was calculated, the filter at the nextposition (as the filter moves one row down) is efficiently calculated byshifting the content of memories by one and calculating only the newestrow. This is schematically illustrated in FIG. 11. The memory contentsare shifted as follows,R_(X,1)←R_(X,2)  (11)R_(X,2)←R_(X,3)  (12). . .. . .R _(X,2N)←R_(X,2N+1)  (13)

Finally, the newest row is calculated as follows, $\begin{matrix}{R_{X,{{2N} + 1}} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,{{2N} + 1}}}} & (14)\end{matrix}$Then these terms or the contents of the memories are summed as follows,$\begin{matrix}{R_{X} = {{- {\sum\limits_{j = 1}^{j = N}R_{X,j}}} + {\sum\limits_{j = {N + 2}}^{j = {{2N} + 1}}R_{X,j}}}} & (15)\end{matrix}$

This efficient filter calculation is illustrated in the flow chart shownin FIG. 9 b. The calculation is illustrated using a horizontal edgedetection filter such as one illustrated in FIG. 5 g. As is illustrated,the method of performing edge detection using the horizontal edge filterconsisting of coefficients −1, 0 and 1 begins at the starting column 1,row 1 of an image. First, there is calculated the first row by addingall of the columns in the image corresponding to the columns in the edgedetection filter and storing the results in memory #1. Then, the nextrow j is calculated by adding all corresponding columns in the edgedetection filter and storing the result in memory #j. This is repeateduntil the (2N+1)th row is calculated. Once j=2N+1, the memory contentsare multiplied by either −1, 0, or 1 as necessary and the results aresummed from memories #1 through #2N+1. The result of this calculation isoutputted as the filter output. Next, the memories are shifted asillustrated and described with reference to FIG. 11. Returning to FIG. 9b, the edge detection filter is then moved downwards on the image by onerow. A check is then performed to make sure that the edge detectionfilter is not out of the image row range of the image. If it is, thefilter is moved over by one column and the process is begun once againat the new column and at row 1. In addition, a check is performed tomake sure that the edge detection filter is not out of image columns. Ifthis is the case, processing ends. If, the edge detection filter is notout of image rows, the newest row 2N+1 is calculated and the resultsstored in memory #2N+1. Once again the memory contents of memories #1through 2N+1 are multiplied by −1, 0 or 1 and added to obtain the filteroutput result. Electronic circuits shown in FIG. 15 efficientlycalculate this horizontal edge filter. Image pixel data are read outfrom image memory and fed to memory #2M+1 and shifted to memory #2M, . .. #1. All pixel data forming the image in the same row are summed at thesummer 1501 and the summer's 1501 output is fed to memory #2N+1 andshifted to #N+2, . . . #1. The contents of memory #2N+1 to #N+2 areadded while the contents of memory #N to #1 are subtracted at the summerin order to calculate the filter output. While illustrated withreference to advancing an edge detection filter vertically from the topto the bottom of an image by single units, then advancing from left toright one unit at a time and repeating the process, the presentinvention is not so limited. Rather the present invention is drawnbroadly to moving in two orthogonal directions, preferably top tobottom, and left to right.

This can be extended to a more general form of the edge filter ofcoefficients as shown in FIGS. 6 a-b. “a” can be an integer orfloating-point of positive or negative value. A similar efficient filteroperation is described in the following section.

For the horizontal edge direction, after calculating the rows as if allthe coefficients are 1, the row results are multiplied by thecoefficient of a. Multiplying each row result is more efficient thanmultiplying each pixel data. $\begin{matrix}{R_{X} = {{{- a}{\sum\limits_{j = 1}^{j = N}R_{X,j}}} + {\sum\limits_{j = {N + 2}}^{j = {{2N} + 1}}R_{X,j}}}} & (16) \\{R_{X,1} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,1}}} & (17) \\{{R_{X,2} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,2}}}\cdots\cdots} & (18) \\{R_{X,{{2N} + 1}} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,{{2N} + 1}}}} & (19) \\{R_{X} = {{{- a}{\sum\limits_{j = 1}^{j = N}R_{X,j}}} + {a{\sum\limits_{j = {N + 2}}^{j = {{2N} + 1}}R_{X,j}}}}} & (20)\end{matrix}$

Once the filter was calculated for the first position, the content ofthe memories are shifted by one and only the newest row is calculated asthe filter moves one row down.R_(X,1)←R_(X,2)  (21)R_(X,2)←R_(X,3)  (22). . .. . .R_(X,2N)←R_(X,2N+1)  (23)

Only the newest row is calculated as follows $\begin{matrix}{R_{X,{{2N} + 1}} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,{{2N} + 1}}}} & (24)\end{matrix}$

Then sum these terms. $\begin{matrix}{R_{X} = {{{- a}{\sum\limits_{j = 1}^{j = N}R_{X,j}}} + {a{\sum\limits_{j = {N + 2}}^{j = {{2N} + 1}}R_{X,j}}}}} & (25)\end{matrix}$

This efficient calculation is illustrated by the flowchart shown in FIG.10 a.

α can be 1 or −1 or other values.

The similar iteration technique can be used to calculate R efficientlyfor a more general filter using α_(j) $\begin{matrix}{R_{X} = {{- {\sum\limits_{j = 1}^{j = N}{a_{j}R_{j}}}} + {\sum\limits_{j = {N + 2}}^{j = {{2N} + 1}}{a_{{2N} + 2 - j}R_{j}}}}} & (26)\end{matrix}$

This can be efficiently calculated as follows $\begin{matrix}{R_{X,1} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,1}}} & (27) \\{R_{X,2} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,2}}} & (28) \\\ldots & \quad \\{R_{X,{{2N} + 1}} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,{{2N} + 1}}}} & (29) \\{R_{X} = {{- {\sum\limits_{j = 1}^{j = N}{a_{j}R_{X,j}}}} + {\sum\limits_{j = {N + 2}}^{j = {{2N} + 1}}{a_{{2N} + 2 - j}R_{X,j}}}}} & (30)\end{matrix}$

Once the filter in the first position was calculated, we can only shiftthe content of memories by one and calculate the newest row as thefilter moves one row down.R_(X,1)←R_(X,2)  (31)R_(X,2)←R_(X,3)  (32). . .. . .R_(X,2N)←R_(X,2N+1)  (33)

Only the newest row is calulated as follows $\begin{matrix}{R_{X,{{2N} + 1}} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,{{2N} + 1}}}} & (34)\end{matrix}$

Then sum these terms. $\begin{matrix}{R_{X} = {{- {\sum\limits_{j = 1}^{j = N}{a_{j}R_{X,j}}}} + {\sum\limits_{j = {N + 2}}^{j = {{2N} + 1}}{a_{{2N} + 2 - j}R_{X,j}}}}} & (35)\end{matrix}$

The filter moves down and the calculation continues until the filterposition goes out of the image row or the image boundary. The filterposition then moves to the first row of the next column position andcontinues the same operation.

For vertical edges, the filter in FIG. 5 h can be expressed by$\begin{matrix}{R_{Y} = {\sum\limits_{j = 1}^{j = {{2N} + 1}}\left( {{- \underset{i = 1}{\overset{i = M}{{\sum z_{i,j}} +}}}{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,j}}} \right)}} & (36)\end{matrix}$

This calculation can be efficiently executed by an iteration techniqueas described before. $\begin{matrix}{R_{Y,1} = {{- \underset{i = 1}{\overset{i = M}{{\sum z_{i,1}} +}}}{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,1}}}} & (37) \\{R_{Y,2} = {{- \underset{i = 1}{\overset{i = M}{{\sum z_{i,2}} +}}}{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,2}}}} & (38) \\\ldots & \quad \\{R_{Y,{{2N} + 1}} = {{- \underset{i = 1}{\overset{i = M}{{\sum z_{i,{{2N} + 1}}} +}}}{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,{{2N} + 1}}}}} & (39) \\{R_{Y} = {\sum\limits_{j = 1}^{j = {{2N} + 1}}R_{Y,j}}} & (40)\end{matrix}$

Once the filter in the first position is calculated, the filter in thenext position can be calculated by only shifting the contents ofmemories and calculating only the newest row as follows,R_(Y,1)←R_(Y,2)  (41)R_(Y,2)←R_(Y,3)  (42). . .. . .R_(Y,2N)←R_(Y,2N+1)  (43)and only the newest row is calculated as follows, $\begin{matrix}{R_{Y,{{2N} + 1}} = {{- \underset{i = 1}{\overset{i = M}{{\sum z_{i,{{2N} + 1}}} +}}}{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,{{2N} + 1}}}}} & (44)\end{matrix}$

This operation is depicted in FIG. 11. Furthermore, the flowchart inFIG. 9 a describes the iteration method at many positions in the wholeimage area. The method illustrated in FIG. 9 a is quite similar to thatillustrated above with reference to FIG. 9 b. The primary differencearises from slightly different calculations regarding the arrangement ofthe vertical edge filter coefficients −1, 0, 1. It should be emphasizedat this point that the present invention is directed to the use ofhorizontal and vertical edge filters of any size having an arrangementof coefficients such as is illustrated with reference to FIGS. 5 a-5 h.It would be evident to one skilled in the art to expand the applicationof any horizontal or vertical edge filter configured as are thosedefined by the present invention using the same methodology outlinedherein. Returning to FIG. 9 a, the vertical edge filter is applied atcolumn 1, row 1 to the image. There is then calculated the first row bymultiplying each column of image pixels with −1, 0, 1 as appropriate andsumming the results, further storing the result of the summation inmemory #1. Next, there is calculated row j by multiplying each columnwith −1, 0, 1 and summing the results, further storing the results inmemory j. There is then, as before with reference to FIG. 9 b, performeda check to see if the (2N+1)th row has been calculated. If not, the nextrow j is calculated and continues to be calculated in an interactivefashion until the (2N+1) th row is calculated. When j=2N+1, all of thememories are summed from memory #1 to memory #2N+1. The resultingsummation results in the filter output. The memories are then shifted asdescribed above with reference to the horizontal edge filter. The filteris moved by one row, a check is performed to see if the filter is out ofthe image row, and if not, the newest row 2N+1 is calculated bymultiplying each column with −1, 0, 1 and summing the results, storingthem in memory #2N+1. FIG. 13 illustrates electronic circuits toefficiently calculate this vertical edge filter. All pixels (image) datain the same row are read out from image memory and fed to memory #2M+1and shifted to memory #2M, . . . and #1. The pixel data in the same roware summed or subtracted at the summer. All pixels data of the next roware read out and summed at the summer in the same fashion. Thisoperation continues until the last row of the filter for one filterposition. The output (result) of the summer is fed to memory #2N+1 andshifted to memory #2N, . . . and #1. The contents of the memory #2N+1 to1 are summed to calculate the filter output.

The filter is moved down by one row position and the filter calculationcontinues until the filter goes out of the image row or boundary.

The filter is not limited to −1, 0, 1 coefficients and can take ageneral form using a, or aj as $\begin{matrix}{R_{Y} = {\sum\limits_{j = 1}^{j = {{2N} + 1}}\left( {{{- a}{\sum\limits_{i = 1}^{i = M}z_{i,j}}} + {a{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,j}}}} \right)}} & (45)\end{matrix}$α can be also 1 or −1 or other values. This can be efficientlycalculated using the iteration technique as described before. The firstrow to 2N+1 row in the filter mask are calculated as follows,$\begin{matrix}{R_{Y,1} = {{- a}\underset{i = 1}{\overset{i = M}{{\sum z_{i,1}} +}}a{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,1}}}} & (46) \\{R_{Y,2} = {{- a}\underset{i = 1}{\overset{i = M}{{\sum z_{i,2}} +}}a{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,2}}}} & (47) \\\ldots & \quad \\{R_{Y,{{2N} + 1}} = {{- a}\underset{i = 1}{\overset{i = M}{{\sum z_{i,{{2N} + 1}}} +}}a{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,{{2N} + 1}}}}} & (48) \\{R_{Y} = {\sum\limits_{j = 1}^{j = {{2N} + 1}}R_{Y,j}}} & (49)\end{matrix}$

As the filter is moved down by one row and the iteration operation canbe used as follows.R_(Y,1)←R_(Y,2)  (50)R_(Y,2)←R_(Y,3)  (51). . .. . .R_(Y,2N)←R_(Y,2N+1)  (52)and only the newest row is calculated as follows, $\begin{matrix}{R_{Y,{{2N} + 1}} = {{{- a}{\sum\limits_{i = 1}^{i = M}z_{i,{{2N} + 1}}}} + {a{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,{{2N} + 1}}}}}} & (53)\end{matrix}$Using α_(i) $\begin{matrix}{R_{Y} = {\sum\limits_{j = 1}^{j = {{2N} + 1}}\left( {{- {\sum\limits_{i = 1}^{i = M}{a_{i}z_{i,j}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}{a_{{2M} + 2 - i}z_{i,j}}}} \right)}} & (54) \\{R_{Y,1} = {{- \underset{i = 1}{\overset{i = M}{{\sum{a_{i}z_{i,1}}} +}}}{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}{a_{2\underset{2 - i}{M}}z_{i,1}}}}} & (55) \\{{R_{Y,2} = {{- \underset{i = 1}{\overset{i = M}{{\sum{a_{i}z_{i,2}}} +}}}{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}{a_{{2M} + 2 - i}z_{i,2}}}}}\cdots\cdots} & (56) \\{R_{Y,{{2N} + 1}} = {{- \underset{i = 1}{\overset{i = M}{{\sum{a_{i}z_{i,{{2N} + 1}}}} +}}}{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}{a_{{2M} + 2 - i}z_{i,{{2N} + 1}}}}}} & (57) \\{R_{Y} = {\sum\limits_{j = 1}^{j = {{2N} + 1}}R_{Y,j}}} & (58)\end{matrix}$

As the filter is moved down by one row and the iteration operation canbe used as follows.R_(Y,1)←R_(Y,2)  (59)R_(Y,2)←R_(Y,3)  (60). . .. . .R_(Y,2N)←R_(Y,2N+1)  (61)and only the newest row is calculated as follows, $\begin{matrix}{R_{Y,{{2N} + 1}} = {{- {\sum\limits_{i = 1}^{i + M}{a_{i}z_{i,{{2N} + 1}}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}{a_{{2M} + 2 - i}z_{i,{{2N} + 1}}}}}} & (62)\end{matrix}$

Other forms of iteration can be also used to speed up the filtercalculation in the whole image area. For example, for the verticaledges, after calculating the filter result in the first position, thenext row position can be calculated by adding the new row to the resultof the first position and subtracting the last row in the firstposition. The vertical edge filter is calculated as follows,$\begin{matrix}{R_{Y} = {\sum\limits_{j = 1}^{j = {{2N} + 1}}\left( {{- {\sum\limits_{i = 1}^{i = M}z_{i,j}}} + {\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,j}}} \right)}} & (63)\end{matrix}$

This result R_(Y) is stored in memory. The calculation result of eachrow expressed below is also stored in memory #1 to #2N+1.$\begin{matrix}{R_{Y,1} = {{- \underset{i = 1}{\overset{i = M}{{\sum z_{i,1}} +}}}{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,1}}}} & (64) \\{{R_{Y,2} = {{- \underset{i = 1}{\overset{i = M}{{\sum z_{i,2}} +}}}{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,2}}}}\cdots\cdots} & (65) \\{R_{Y,{{2N} + 1}} = {{- \underset{i = 1}{\overset{i = M}{{\sum z_{i,{{2N} + 1}}} +}}}{\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,{{2N} + 1}}}}} & (66)\end{matrix}$

Next, the filter moves down by one row and the filter of the newposition can be calculated as described below. First, the contents ofthe memories are shifted as follow,R_(Y,0)←R_(Y,1)  (67)R_(Y,1)←R_(Y,2)  (68)R_(Y,2)←R_(Y,3)  (69). . .. . .R_(Y,2N)←R_(Y,2N+1)  (70)R _(Y)←(R _(Y) −R _(Y,0) +R _(Y,2N+1))  (71)where ← sign indicates storing the right hand term into the left handterm, also R_(Y,0) indicates the first row result of the previousposition. R_(Y,2N+1) in the last operation indicates the newestcalculation result for the newest row. This calculation of the newestrow R_(Y,2N+1) is actually carried out. However, the summing operationrequires only one addition and one subtraction of the row results ratherthan 2N+1 additions of the previous iteration method. The R_(Y) valuefrom the previous position and stored in the memory is used and updatedby the summing operation and stored in the memory again. This iterationtechnique can be extended to filter coefficients of a or aj just likebefore. This operation of adding the newest row and subtracting theoldest row is best illustrated in FIG. 11 b.

FIG. 14 illustrates electronic circuits comprising memory locations,accumulators, summers, and the like, to efficiently calculate thisvertical edge filter. While diagrammed with reference to such physicalcircuit components, it is recognized that the operations of the presentinvention can be performed in whole, or in part, by a digital signalprocessor (DSP) All pixels (image) data in the same row are read outfrom image memory and fed to memory #2M+1 and shifted to memory #2M, . .. and #1. The pixel data in the same row are summed or subtracted at thesummer 141. All pixels data of the next row are read out and summed atthe summer in the same fashion. This operation continues until the lastrow of the filter for one filter position. The output (result) of thesummer is fed to memory #2N+1 and shifted to memory #2N, . . . and #0.For the first filter position, the contents of the memory #2N+1 to 1 aresummed to calculate the filter output as switches of memory #1 to 2N+1are all closed but switch of memory #0 is open. For the next filterposition, switches of memory #0 and #2N+1 are closed while switches ofmemory #1 to #2N are open to calculate the new filter output by addingthe newest row data (memory #2N+1) and subtracting the oldest row(memory #0) from the previous filter result (output) or the summer'scontent.

Similarly, the horizontal edge filter can be efficiently calculated asfollows. $\begin{matrix}{R_{X} = {{- {\sum\limits_{\underset{j = 1}{{i = 1},}}^{\underset{j = N}{i = {{2M} + 1}}}z_{i,j}}} + {\sum\limits_{\underset{j = {N + 2}}{{i = 1},}}^{\underset{j = {{2N} + 1}}{i = {{2M} + 1}}}z_{i,j}}}} & (72) \\{R_{X,1} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,1}}} & (73) \\{{R_{X,2} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,2}}}\cdots\cdots} & (74) \\{R_{X,{{2N} + 1}} = {\sum\limits_{i = 1}^{i = {{2M} + 1}}z_{i,{{2N} + 1}}}} & (75) \\{R_{X} = {{- {\sum\limits_{j = 1}^{j = N}R_{X,j}}} + {\sum\limits_{j = {N + 2}}^{j = {{2N} + 1}}R_{X,j}}}} & (76)\end{matrix}$

The filter output of the first position is stored in memory. Also, thecalculation result of rows are stored in memories #1 to #2N+1. Then thefilter is moved down by one row and the filter output in the newposition is efficiently calculated as follows. First the contents ofmemories #1 to #2N+1 are shifted as follows,R_(X,0)←R_(X,1)  (77)R_(X,1)←R_(X,2)  (78)R_(X,2)←R_(X,3)  (79). . .. . .R_(X,2N)←R_(X,2N+1)  (80)R _(X)←(R _(X) +R _(X,0) −R _(X,N) −R _(X,N+1) +R _(X,2N+1))  (81)

Only R_(X,2N+1) at the new position is actually calculated and stored inmemory #2N+1 while all other terms in the right side are in thememories. R_(X) value from the previous position and stored in thememory is used and updated by the summing operation and stored in thememory again. Electronic circuits shown in FIG. 16 efficientlycalculates this horizontal edge filter. Image pixel data are read outfrom image memory and fed to memory #2M+1 and shifted to memory #2M, . .. #1. All pixels data in the same row are summed at the summer and thesummer's output is fed to memory #2N+1 and shifted to #N+2, . . . and#0. For the first filter position, the contents of memory #2N+1 to #N+2are added while the contents of memory #N to #1 are subtracted at thesummer in order to calculate the filter output. Switches at memoriesfunction to achieve this operation. All switches except memory #N+1 and#0 are closed for the first filter position. Once the filter output iscalculated, the new pixel data in the next row enter memory #2M+1 to #1and summed at the summer and this output or the newest summed row datafrom the next filter position enters memory #2N+1. Meantime, thecontents of memory #2N+1 to 0 are all shifted right by one memory. Thefilter result (output) or the content of the summer from the previousfilter position is then updated for the new position by adding thecontent of memory #2N+1 and #0 and subtracting the contents of memory#N+1 and #N. Switches function to achieve this operation. Switches atmemory #2N+1, #N+1, #N and #0 are closed while all other switches areopen.

This iteration method saves the number of additions. These operations ofvertical and horizontal edges can be expanded to have coefficients of a,−a, 0, or aj as before. With these coefficients, the iteration methodsaves the number of multiplications as well as additions and thus thefilter's speed is increased.

The most general form of the edge detection filter is as follows,$\begin{matrix}{R = {\sum\limits_{\underset{j = 1}{i = 1}}^{\underset{j = {{2N} + 1}}{i = {{2M} + 1}}}{a_{i,j}z_{ij}}}} & (82)\end{matrix}$

However, the filter can be of symmetrical form as follows

For the horizontal edge filter,α_(i,2N+2−j)−α_(i,j)  (83)andα_(i,N+1)=0  (84)where i=1 to 2M+1 and j=1 to Nandα_(2M+2−i,j)=α_(i,j)  (85)where i=1 to M and j=1 to 2N+1.

This horizontal edge filter is illustrated in FIG. 7 a as an example of9×9 filter.

Furthermore, α_(i,j) is split into x and y components for the horizontaledge filter as followsα_(i,j) =b _(i) ·c _(j)  (86)b_(2M+2−i) =b _(i)  (87)where i=1 to MAlso−c_(2N+2−j)=c_(j)  (88)where j=1 to NFinally the horizontal edge filter can be expressed as follows,$\begin{matrix}{R_{X} = {{- {\sum\limits_{\underset{j = 1}{i = 1}}^{\underset{j = N}{i = {{2M} + 1}}}{b_{i}c_{j}z_{ij}}}} + {\sum\limits_{\underset{j = {N + 2}}{i = 1}}^{\underset{j = {{2N} + 1}}{i = {{2M} + 1}}}{b_{i}c_{{2N} + 2 - j}z_{ij}}}}} & (89)\end{matrix}$This filter can use the iteration technique for a faster calculation.

For the vertical edge filter, filter coefficients α_(i,j) also havesymmetry except the sign (plus or minus).α_(2M+2−i,j)=−α_(i,j)  (90)andα_(M+1,j)=0  (91)where i=1 to M and j=1 to 2N+1Alsoα_(1,2N+2−j)=α_(i,j)  (92)where i=1 to 2M+1 and j=1 to N.This vertical edge filter is illustrated in FIG. 7 b as an example of9×9 filter.Furthermore, α_(i,j) is split into x and y components for the verticaledge filter as followsα_(i,j) =b _(i) ·c _(j)  (93)−b_(2M+2−i)=b_(i)  (94)where i=1 to Mc_(2N+2−j)=c_(j)  (95)where j=1 to NFinally the vertical direction filter can be expressed as follows,$\begin{matrix}{R_{Y} = {\underset{j = 1}{\overset{j = {{2N} + 1}}{\sum c_{j}}}\left( {{- {\sum\limits_{i = 1}^{i = M}{b_{i}z_{ij}}}} + {\sum\limits_{i = {M + 2 - i}}^{i = {{2M} + 1}}{b_{{2M} + 2 - i}z_{ij}}}} \right)}} & (96)\end{matrix}$Furthermore, this filter can use the iteration technique for a fastercalculation.

In case of the filter with a square mask or M=N, the edge filters of 2directions need to be equally weighted in the directions and thus|b_(i)|=|c_(i)|  (97)except the center row for the horizontal edge filter and the centercolumn for the vertical edge filter.

Also the same symmetrical properties, which were previously discussed,apply to these coefficients.

Therefore, the edge filters can be expressed as follows. $\begin{matrix}{R_{X} = {{- {\sum\limits_{\underset{j = 1}{i = 1}}^{\underset{j = M}{i = {{2M} + 1}}}{b_{i}b_{j}z_{ij}}}} + {\sum\limits_{\underset{j = {M + 2}}{i = 1}}^{\underset{j = {{2M} + 1}}{i = {{2M} + 1}}}{b_{i}b_{{2M} + 2 - j}z_{ij}}}}} & (98)\end{matrix}$

This horizontal edge filter is illustrated in FIG. 8 a as an example ofan 9×9 filter. This horizontal edge filter can be efficiently calculatedusing the electronic circuit shown in FIG. 17. Image data are read outfrom image memory and fed to memory #2M+1 and shifted to memory #2M, . .. #1. The contents of these memories are multiplied by coefficients b1,. . . , b2M+1 and summed at the summer. The output of summer is fed tomemory #2N+1 and shifted to memory #2N , . . . #0. For the first filterposition, the contents of memory #2N+1 to #1 excluding #N+1 aremultiplied by coefficients and summed at the summer to calculate thefilter output. For the next filter position, new image data for thenewest row are read out from the image memory and fed to memory #2M+1and shifted and the contents of memory #2M+1 to 1 are multiplied bycoefficients and summed at the summer and the summer's output is fed tomemory #2N+1. Meantime, the contents of memory #2N+1 to #0 are shiftedright by one memory. The filter output or the content of the summer isupdated by adding the value of memory #2N+1 multiplied by coefficientb1, subtracting the values of memory #N+1 and #N multiplied by bN andadding the value of memory #0 multiplied coefficient b1 to the filteroutput of the previous position (or the summer's content). It's notedthat M=N. $\begin{matrix}{R_{Y} = {\sum\limits_{j = 1}^{j = {{2M} + 1}}{b_{j}\left( {{- {\sum\limits_{i = 1}^{i = M}{b_{i}z_{ij}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}{b_{{2M} + 2 - i}z_{ij}}}} \right)}}} & (99)\end{matrix}$

This vertical edge filter is illustrated in FIG. 8 b as an example of an9×9 filter. Electronic circuit shown in FIG. 18 can efficientlycalculate this vertical edge filter. Image data are read out from imagememory and fed to memory #2M+1 and shifted to #2M to #1. These columnpixel data in the same row are multiplied by coefficients and summed(i.e., added or subtracted) at the summer as shown in FIG. 18. Thesummer's output is fed to memory #2N+1 and shifted right by one memoryas more summation data in a row are fed to memory #2N+1. For the firstfilter position, the contents of memory #2N+1 to 1 are multiplied andsummed at the summer to calculate the filter output. For the nextposition, the result of the first filter position is used to efficientlycalculate the next result. As the new summed data of the newest row forthe new filter position is fed to memory #2N+1, all memory contents areshifted right and the new filter output is calculated by adding memory#2N+1 content multiplied by coefficient b1 and subtracting memory #0multiplied by b1 from the previous filter result or the content of thesummer.

In another embodiment, the filters can move upward starting from thebottom row. In another embodiment, the filter can move laterally, forexample, to the right, starting from the far left column. In anotherembodiment, the filter can move laterally to the left, starting from thefar right column.

One or more embodiments of the present invention have been described.Nevertheless, it will be understood that various modifications may bemade without departing from the spirit and scope of the invention.Accordingly, other embodiments are within the scope of the followingclaims.

1. An edge detection filter comprising: an array of filter coefficientshaving an odd number of rows and columns; a first set of zerocoefficients extending along a direction traversing said array through acenter position to form a first and second side; a second set ofpositive coefficients extending away from said direction on said firstside; and a third set of negative coefficients extending away from saiddirection on said second side.
 2. The edge detection filter of claim 1wherein each of said second set of positive coefficients is equal to +1.3. The edge detection filter of claim 1 wherein each of said third setof negative coefficients is equal to −1.
 4. The edge detection filter ofclaim 1 wherein each of said second set of positive coefficients andeach of said third set of negative coefficients have an identicalmagnitude.
 5. The edge detection filter of claim 4 wherein saidmagnitude is selected from the group consisting of floating pointnumbers and integers.
 6. The edge detection filter of claim 1 whereinsaid direction extends horizontally across said array.
 7. The edgedetection filter of claim 1 wherein said direction extends verticallyacross said array.
 8. A method for detecting edges in an imagecomprising the steps of: applying a horizontal edge detection filter tosaid image to produce a horizontal edge detection result; applying avertical edge detection filter to said image to produce a vertical edgedetection result; and combining said horizontal edge detection resultand said vertical edge detection result to detect an edge.
 9. The methodof claim 8 wherein said applying said horizontal edge detection filtercomprises applying said horizontal edge detection filter comprising: anarray of filter coefficients having an odd number of rows and columns; afirst set of zero coefficients extending in a horizontal directiontraversing said array and through a center position to form a first andsecond side; a second set of positive coefficients extending away fromsaid direction on said first side; and a third set of negativecoefficients extending away from said direction on said second side. 10.The method of claim 8 wherein said applying said vertical edge detectionfilter comprises applying said vertical edge detection filtercomprising: an array of filter coefficients having an odd number of rowsand columns; a first set of zero coefficients extending in a verticaldirection traversing said array through a center position to form afirst and second side; a second set of positive coefficients extendingaway from said direction on said first side; and a third set of negativecoefficients extending away from said direction on said second side. 11.A method for applying an edge detection filter to an image comprisingthe steps of: a. providing an image comprised of rows and columns; b.providing an edge detection filter comprising: an array of filtercoefficients having an odd number of rows and columns; a first set ofzero coefficients extending along a direction traversing said arraythrough a center position to form a first and second side; a second setof coefficients equal to 1 extending away from said direction on saidfirst side; and a third set of coefficients equal to −1 extending awayfrom said direction on said second side; c. positioning said edgedetection filter to a position at a first direction origin and a seconddirection origin of said image; d. applying said edge detection filterto said image to calculate a plurality of row values; e. storing each ofsaid plurality of row values in a memory location; f. summing each ofsaid plurality of memory locations to produce a filter output; g.shifting the contents of said plurality of memory locations; h.incrementing said position of said edge detection filter in a firstdirection; i. repeating steps d through h until a boundary of said imageis reached; j. incrementing said position of said edge detection filterin a second direction and resetting said position to said firstdirection origin of said image; and h. repeating steps d through j untila boundary of said image is reached.
 12. The method of claim 11 whereinsaid incrementing said edge detection filter in a first and seconddirection comprises incrementing said edge detection filter in saidfirst and second direction said first direction orthogonal to saidsecond direction.
 13. The method of claim 11 wherein said incrementingsaid edge detection filter in a first direction comprises incrementingsaid edge detection filter in a direction selected from the setconsisting of vertical and horizontal.
 14. An edge detection filtercomprising: an array of filter coefficients having an odd number of rowsand columns; a first set of zero coefficients extending along adirection traversing said array through a center position to form afirst and second side; a second set of positive coefficients extendingaway from said direction on said first side wherein each of said secondset of positive coefficients is the product of two predefinedcoefficients; and a third set of negative coefficients extending awayfrom said direction on said second side wherein each of said third setof negative coefficients is the product of two predefined coefficients.15. An apparatus for performing edge detection comprising: an imagecomprised of rows and columns; an edge detection filter comprising: anarray of filter coefficients having an odd number of rows and columns; afirst set of zero coefficients extending along a direction traversingsaid array through a center position to form a first and second side; asecond set of coefficients equal to 1 extending away from said directionon said first side; and a third set of coefficients equal to −1extending away from said direction on said second side; means forapplying said edge detection filter to said image to calculate aplurality of row values; means for storing each of said plurality of rowvalues in a memory location; means for summing each of said plurality ofmemory locations to produce a filter output; and means for shifting thecontents of said plurality of memory locations.
 16. The apparatus ofclaim 15 additionally comprising a plurality of switches for selectivelyadding or subtracting said row values.
 17. The apparatus of claim 15wherein said means for applying, means for storing, means for summing,and means for shifting is selected from the group comprising digitalsignal processors and memory units.
 18. A method for applying an edgedetection filter to an image comprising the steps of: a. providing animage comprised of rows and columns; b. providing an edge detectionfilter comprising: an array of filter coefficients having an odd numberof rows and columns; a first set of zero coefficients extending along adirection traversing said array through a center position to form afirst and second side; a second set of coefficients equal to 1 extendingaway from said direction on said first side; and a third set ofcoefficients equal to −1 extending away from said direction on saidsecond side; c. positioning said edge detection filter to a position ata first direction origin and a second direction origin of said image; d.applying said edge detection filter to said image to calculate aplurality of row values; e. storing each of said plurality of row valuesin one of a plurality of memory locations; f. summing each of saidplurality of memory locations to produce a filter output and store saidfilter output in a memory storage device; g. incrementing said positionof said edge detection filter in a first direction; h. shifting thecontents of said plurality of memory locations to add a new row andcreate an old row; i. summing a plurality of values comprising said newrow to produce a new row value; j. calculating a new filter output byadding said new row value and subtracting an old row value from saidfilter output; k. storing said new filter output in said memory storagedevice; l. repeating steps g through k until a boundary of said image isreached; m. incrementing said position of said edge detection filter ina second direction and resetting said position to said first directionorigin of said image; and n. repeating steps d through m until aboundary of said image is reached.
 19. A method for applying an edgedetection filter to an image comprising the steps of: a. providing animage comprised of rows and columns; b. providing an edge detectionfilter comprising: an array of filter coefficients having an odd numberof rows and columns; a first set of zero coefficients extending along adirection traversing said array through a center position to form afirst and second side; a second set of coefficients equal to 1 extendingaway from said direction on said first side; and a third set ofcoefficients equal to −1 extending away from said direction on saidsecond side; c. positioning said edge detection filter to a position ata first direction origin and a second direction origin of said image; d.applying said edge detection filter to said image to calculate aplurality of row values of R_(X,J); e. storing each of said plurality ofrow values of R_(X,J) in one of a plurality of memory locations; f.summing each of said plurality of memory locations to produce a filteroutput of R_(X) and store said filter output of R_(X) in a memorystorage device; g. incrementing said position of said edge detectionfilter in a first direction; h. shifting the contents of said pluralityof memory locations to add a new row and create an old row; i. summing aplurality of values comprising said new row to produce a new row valueof R_(X,2N+1); j. calculating a filter output for a new filter positionby adding together said filter output of R_(X) from a previous filterposition and a value of R_(X,0), subtracting a value of R_(X,N) and avalue of R_(X,N+1), and adding a value of R_(X,2N+1); k. storing saidnew filter output in said memory storage device; l. repeating steps gthrough k until a boundary of said image is reached; m. incrementingsaid position of said edge detection filter in a second direction andresetting said position to said first direction origin of said image;and n. repeating steps d through m until a boundary of said image isreached.
 20. A method for applying an edge detection filter to an imagecomprising the steps of: a. providing an image comprised of rows andcolumns; b. providing an edge detection filter comprising: an array offilter coefficients having an odd number of rows and columns; a firstset of zero coefficients extending along a direction traversing saidarray through a center position to form a first and second side; asecond set of coefficients equal to 1 extending away from said directionon said first side; and a third set of coefficients equal to −1extending away from said direction on said second side; c. positioningsaid edge detection filter to a position at a first direction origin anda second direction origin of said image; d. applying said edge detectionfilter to said image to calculate a plurality of column values ofR′_(Y,i); e. storing each of said plurality of column values of R′_(Y,i)in one of a plurality of memory locations; f. summing each of saidplurality of memory locations to produce a filter output of R_(Y) andstore said filter output of R_(Y) in a memory storage device; g.incrementing said position of said edge detection filter in a firstdirection; h. shifting the contents of said plurality of memorylocations to add a new column and create an old column; i. summing aplurality of values comprising said new column to produce a new columnvalue of R′_(Y,2M+1); j. calculating a filter output for a new filterposition by adding together a filter output of R_(Y) from a previousfilter position and a value of R′_(Y,0), subtracting a value of R′_(Y,M)and a value of R′_(Y,M+1), and adding a value of R′_(Y,2M+1); k. storingsaid filter output in said memory storage device; l. repeating steps gthrough k until a boundary of said image is reached; m. incrementingsaid position of said edge detection filter in a second direction andresetting said position to said first direction origin of said image;and n. repeating steps d through m until a boundary of said image isreached.
 21. The method of claim 19, wherein said incrementing saidposition of said edge detection filter in a first direction comprisesincrementing said edge detection filter in a vertical direction or ahorizontal direction.
 22. The method of claim 19, wherein saidincrementing said position of said edge detection filter in a seconddirection comprises incrementing said edge detection filter in avertical direction or a horizontal direction.
 23. The method of claim20, wherein said incrementing said position of said edge detectionfilter in a first direction comprises incrementing said edge detectionfilter in a vertical direction or a horizontal direction.
 24. The methodof claim 20, wherein said incrementing said position of said edgedetection filter in a second direction comprises incrementing said edgedetection filter in a vertical direction or a horizontal direction. 25.An edge detection filter, comprising: an array comprising X number ofrows and Y number of columns of a plurality of filter coefficient cells,wherein X and Y are both odd numbers; a plurality of filter coefficientscomprising a value of zero occupying adjacent filter coefficient cells,wherein at least one of said zero filter coefficients occupies a centerfilter coefficient cell of said array; and said remaining plurality offilter coefficient cells are occupied by a plurality of positivenumerical values occupying said filter coefficient cells adjacent tosaid plurality of zero filter coefficients and a plurality of negativenumerical values occupying said filter coefficient cells adjacent tosaid plurality of zero filter coefficients and opposite said pluralityof positive numerical values across said plurality of zero filtercoefficients.
 26. The edge detection filter of claim 25, wherein saidzero filter coefficients occupying said adjacent filter coefficientcells form a direction.
 27. The edge detection filter of claim 25,wherein said zero filter coefficients are aligned horizontally in asingle row of said array.
 28. The edge detection filter of claim 25,wherein said zero filter coefficients are aligned vertically in a singlecolumn of said array.
 29. The edge detection filter of claim 25, whereinsaid zero filter coefficients are not aligned.
 30. The edge detectionfilter of claim 25, wherein said zero filter coefficients extend from afilter coefficient cell at a first outermost side of said array to afilter coefficient cell at a second outermost side of said array. 31.The edge detection filter of claim 30, wherein said first outermost sideis opposite said second outermost side.
 32. The edge detection filter ofclaim 25, wherein said positive numerical values and said negativenumerical values are decimals, floating-point numbers or integers. 33.An apparatus for detecting edges in an ultrasound image, comprising: anultrasound image comprising B number of rows and C number of columns ofa plurality of image pixels; an edge detection filter comprising anarray comprising X number of rows and Y number of columns of a pluralityof filter coefficient cells, wherein X and Y are both odd numbers; aplurality of filter coefficients comprising a value of zero occupyingadjacent filter coefficient cells, wherein at least one of said zerofilter coefficients occupies a center filter coefficient cell of saidarray; said remaining plurality of filter coefficient cells are occupiedby a plurality of positive numerical values occupying said filtercoefficient cells adjacent to said plurality of zero filter coefficientsand a plurality of negative numerical values occupying said filtercoefficient cells adjacent to said plurality of zero filter coefficientsand opposite said plurality of positive numerical values across saidplurality of zero filter coefficients; means for calculating a pluralityof row values by applying said edge detection filter to said pluralityof image pixels; means for storing each of said plurality of row valuesin a plurality of memory locations; means for summing each of saidplurality of said memory locations to calculate a filter output; andmeans for shifting a contents of said plurality of memory locations. 34.The apparatus of claim 33, further comprising a means for activating aswitch to calculate said filter output using said contents of saidplurality of memory locations.
 35. The apparatus of claim 34, whereinsaid means for activating said switch comprises means for opening one ormore switches of one or more of said plurality of memory locations andclosing a remainder of said switches.
 36. The apparatus of claim 34,wherein said means for activating said switch comprises means forcalculating said filter output for a new filter position by adding saidfilter output of R_(X) from a previous filter position and a value ofR_(X,0), subtracting a value of R_(X,N) and a value of R_(X,N+1), andadding a value of R_(X, 2N+1).
 37. The apparatus of claim 33, whereinsaid means for calculating is selected from the group consisting ofdigital signal processors, memory retention devices, multipliers,summers and adders.
 38. The apparatus of claim 33, wherein said meansfor storing is selected from the group consisting of digital signalprocessors, memory retention devices, multipliers, summers and adders.39. An apparatus for detecting edges in an ultrasound image, comprising:an ultrasound image comprising B number of rows and C number of columnsof a plurality of image pixels; an edge detection filter comprising anarray comprising X number of rows and Y number of columns of a pluralityof filter coefficient cells, wherein X and Y are both odd numbers; aplurality of filter coefficients comprising a value of zero occupyingadjacent filter coefficient cells, wherein at least one of said zerofilter coefficients occupies a center filter coefficient cell of saidarray; said remaining plurality of filter coefficient cells are occupiedby a plurality of positive numerical values occupying said filtercoefficient cells adjacent to said plurality of zero filter coefficientsand a plurality of negative numerical values occupying said filtercoefficient cells adjacent to said plurality of zero filter coefficientsand opposite said plurality of positive numerical values across saidplurality of zero filter coefficients; means for calculating a pluralityof row values by applying said edge detection filter to said pluralityof image pixels; means for storing each of said plurality of columnvalues in a plurality of memory locations; means for summing each ofsaid plurality of said memory locations to calculate a filter output;and means for shifting a contents of said plurality of memory locations.40. The apparatus of claim 39, further comprising a means for activatinga switch to calculate said filter output using said contents of saidplurality of memory locations.
 41. The apparatus of claim 40, whereinsaid means for activating said switch comprises means for opening one ormore switches of one or more of said plurality of memory locations andclosing a remainder of said switches.
 42. The apparatus of claim 40,wherein said means for activating said switch comprises means forcalculating said filter output for a new filter position by addingtogether said filter output of R_(Y) from a previous filter position anda value of R′_(Y,0), subtracting a value of R′_(Y,M) and a value ofR′_(Y,M+1), and adding a value of R′_(Y,2M+1).
 43. The apparatus ofclaim 39, wherein said means for calculating is selected from the groupconsisting of digital signal processors, memory retention devices,multipliers, summers and adders.
 44. The apparatus of claim 39, whereinsaid means for storing is selected from the group consisting of digitalsignal processors, memory retention devices, multipliers, summers andadders.
 45. An apparatus for detecting edges in an ultrasound image,comprising: an ultrasound image comprising B number of rows and C numberof columns of a plurality of image pixels; an edge detection filtercomprising an array comprising X number of rows and Y number of columnsof a plurality of filter coefficient cells, wherein X and Y are both oddnumbers; a plurality of filter coefficients comprising a value of zerooccupying adjacent filter coefficient cells, wherein at least one ofsaid zero filter coefficients occupies a center filter coefficient cellof said array; said remaining plurality of filter coefficient cells areoccupied by a plurality of positive numerical values occupying saidfilter coefficient cells adjacent to said plurality of zero filtercoefficients and a plurality of negative numerical values occupying saidfilter coefficient cells adjacent to said plurality of zero filtercoefficients and opposite said plurality of positive numerical valuesacross said plurality of zero filter coefficients; means for calculatinga plurality of row values by applying said edge detection filter at aposition at a first direction origin and a second direction origin tosaid plurality of image pixels; means for storing each of said pluralityof row values in a plurality of memory locations; means for summing eachof said plurality of said memory locations to produce a filter outputand store said filter output in a memory storage device; means forincrementing said position of said edge detection filter in a firstdirection; means for shifting a content of said plurality of memorylocations; means for summing a plurality of values comprising said newrow to produce a new row value; means for calculating a new filteroutput by adding said new row value and subtracting an old row valuefrom said filter output; means for storing said new filter output insaid memory storage device; means for repeating sequentially said meansfor applying, said means for storing, said means for summing and saidmeans for shifting until a boundary an edge of said image is reached;means for incrementing said position of said edge detection filter in asecond direction and resetting said position to said first directionorigin of said image; and means for repeating sequentially said meansfor applying, said means for storing, said means for summing, said meansfor shifting, said means for incrementing, said means for repeatingsequentially and said means for incrementing until a boundary an edge ofsaid image is reached.
 46. An apparatus for detecting edges in anultrasound image, comprising: an ultrasound image comprising B number ofrows and C number of columns of a plurality of image pixels; an edgedetection filter comprising an array comprising X number of rows and Ynumber of columns of a plurality of filter coefficient cells, wherein Xand Y are both odd numbers; a plurality of filter coefficientscomprising a value of zero occupying horizontally aligned filtercoefficient cells in a single row of said array, wherein at least one ofsaid zero filter coefficients occupies a center filter coefficient cellof said array; said remaining plurality of filter coefficient cells areoccupied by a plurality of positive numerical values occupying saidfilter coefficient cells adjacent to said plurality of zero filtercoefficients and a plurality of negative numerical values occupying saidfilter coefficient cells adjacent to said plurality of zero filtercoefficients and opposite said plurality of positive numerical valuesacross said plurality of zero filter coefficients; means for calculatinga plurality of row values by applying said edge detection filter to saidplurality of image pixels; means for storing each of said plurality ofrow values in a plurality of memory locations; means for summing each ofsaid plurality of said memory locations to produce a filter output andstore said filter output in a memory storage device; means for shiftinga content of said plurality of memory locations; means for opening oneor more switches of one or more of said plurality of memory locationsand closing a remainder of said switches; and means for calculating afilter output for a new filter position using said contents of saidplurality of memory locations by adding together said filter output ofR_(X) from a previous filter position and a value of R_(X,0),subtracting a value of R_(X,N) and a value of R_(X,N+1), and adding avalue of R_(X,2N+1.)
 47. An apparatus for detecting edges in anultrasound image, comprising: an ultrasound image comprising B number ofrows and C number of columns of a plurality of image pixels; an edgedetection filter comprising an array comprising X number of rows and Ynumber of columns of a plurality of filter coefficient cells, wherein Xand Y are both odd numbers; a plurality of filter coefficientscomprising a value of zero occupying adjacent filter coefficient cells,wherein at least one of said zero filter coefficients occupies a centerfilter coefficient cell of said array; said remaining plurality offilter coefficient cells are occupied by a plurality of positivenumerical values occupying said filter coefficient cells adjacent tosaid plurality of zero filter coefficients and a plurality of negativenumerical values occupying said filter coefficient cells adjacent tosaid plurality of zero filter coefficients and opposite said pluralityof positive numerical values across said plurality of zero filtercoefficients; means for calculating a plurality of column values byapplying said edge detection filter at a position at a first directionorigin and a second direction origin to said plurality of image pixels;means for storing each of said plurality of column values in a pluralityof memory locations; means for summing each of said plurality of saidmemory locations to produce a filter output and store said filter outputin a memory storage device; means for incrementing said position of saidedge detection filter in a first direction; means for shifting a contentof said plurality of memory locations; means for summing a plurality ofvalues comprising said new column to produce a new column value; meansfor calculating a new filter output by adding said new column value andsubtracting an old column value from said filter output; means forstoring said new filter output in said memory storage device; means forrepeating sequentially said means for incrementing, said means forshifting, said means for summing, said means for calculating and saidmeans for storing until a boundary of said image is reached; means forincrementing said position of said edge detection filter in a seconddirection and resetting said position to said first direction origin ofsaid image; and means for repeating sequentially said means forcalculating, said means for storing, said means for summing, said meansfor incrementing, said means for shifting, said means for summing, saidmeans for calculating, said means for storing, said means for repeatingsequentially and said means for incrementing until a boundary of saidimage is reached.
 48. An apparatus for detecting edges in an ultrasoundimage, comprising: an ultrasound image comprising B number of rows and Cnumber of columns of a plurality of image pixels; an edge detectionfilter comprising an array comprising X number of rows and Y number ofcolumns of a plurality of filter coefficient cells, wherein X and Y areboth odd numbers; a plurality of filter coefficients comprising a valueof zero occupying vertically aligned filter coefficient cells in asingle column, wherein at least one of said zero filter coefficientsoccupies a center filter coefficient cell of said array; and saidremaining plurality of filter coefficient cells are occupied by aplurality of positive numerical values occupying said filter coefficientcells adjacent to said plurality of zero filter coefficients and aplurality of negative numerical values occupying said filter coefficientcells adjacent to said plurality of zero filter coefficients andopposite said plurality of positive numerical values across saidplurality of zero filter coefficients; means for calculating a pluralityof column values by applying said edge detection filter to saidplurality of image pixels; means for storing each of said plurality ofcolumn values in a plurality of memory locations; means for summing eachof said plurality of said memory locations to produce a filter outputand store said filter output in a storage memory device; means forshifting a content of said plurality of memory locations; means foropening one or more switches of one or more of said plurality of memorylocations and closing a remainder of said switches; and means forcalculating a filter output for a new filter position using saidcontents of said plurality of memory locations by adding together saidfilter output of R_(Y) from a previous filter position and a value ofR′_(Y,0), subtracting a value of R′_(Y,M) and a value of R′_(Y,M+1), andadding a value of R′_(Y,2M+1).